﻿// KeyValuePairToKeyConverter.cs
using System;
using System.Globalization;
using System.Windows.Data;

namespace StudentInfoSystem.UI.Converters
{
    public class KeyValuePairToKeyConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is null) return null;

            dynamic kvp = value;
            return kvp.Key;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}